package guiDisplay;

public class MovieComputedRating implements Comparable<MovieComputedRating>{
	private String _movieName;
	private Double _p;

	public MovieComputedRating(String name, Double p){
		_p=p;
		_movieName=name;
	}

	public String get_movieName() {
		return _movieName;
	}

	public Double get_p() {
		return _p;
	}

	public int compareTo(MovieComputedRating o) {
		int cmp=-_p.compareTo(o.get_p());
		if (cmp==0)
			return _movieName.compareTo(o.get_movieName());
		else return cmp;
	}

}

